import 'package:flutter/material.dart';
import '../../../shared/utils/responsive_utils.dart';

class ReviewPage extends StatelessWidget {
  const ReviewPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('复习队列')),
      body: ListView(
        padding: EdgeInsets.all(
          ResponsiveUtils.getResponsiveSpacing(context, 16),
        ),
        children: const <Widget>[_EmptyReview()],
      ),
    );
  }
}

class _EmptyReview extends StatelessWidget {
  const _EmptyReview();

  @override
  Widget build(BuildContext context) {
    final ColorScheme cs = Theme.of(context).colorScheme;
    return Container(
      padding: EdgeInsets.all(
        ResponsiveUtils.getResponsiveSpacing(context, 20),
      ),
      decoration: BoxDecoration(
        color: cs.surfaceContainerHighest,
        borderRadius: BorderRadius.circular(
          ResponsiveUtils.getResponsiveRadius(context, 12),
        ),
      ),
      child: Column(
        children: <Widget>[
          Icon(
            Icons.hourglass_empty,
            size: ResponsiveUtils.getResponsiveIconSize(context, 56),
            color: cs.onSurface.withOpacity(0.3),
          ),
          SizedBox(height: ResponsiveUtils.getResponsiveSpacing(context, 12)),
          Text(
            '暂无待复习题目',
            style: TextStyle(
              fontSize: ResponsiveUtils.getResponsiveFontSize(context, 16),
              fontWeight: FontWeight.w700,
              color: cs.onSurface.withOpacity(0.75),
            ),
          ),
          SizedBox(height: ResponsiveUtils.getResponsiveSpacing(context, 8)),
          Text(
            '完成练习或拍题后，这里会自动生成复习队列',
            style: TextStyle(color: cs.onSurface.withOpacity(0.55)),
            textAlign: TextAlign.center,
          ),
          SizedBox(height: ResponsiveUtils.getResponsiveSpacing(context, 16)),
          FilledButton.icon(
            onPressed: () {},
            icon: Icon(Icons.playlist_add),
            label: const Text('开始一次练习'),
          ),
        ],
      ),
    );
  }
}
